<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<title>Constructor</title>
<head>
	<script type="text/javascript">

	Object.extend = function(s,d){
		var p;
		for(p in s){
			d[p]=s[p];	
		};
		return d;
	};	
		
		
	function compono(){}
	compono.prototype = {
		toString:function(){ return this.name; }
		core:compono,
		
		$:function(id){},
		$B:function(){},
		$D:function(){},
		$E:function(){},
		$Fx:function(){},
	}

	compono.Class = function(proto){
		var c = proto.constructor||new Function();
		c.prototype = new (this.parent||compono)();
		c.Class = arguments.callee;
		Object.extend(proto,c.prototype);
		return c.parent = c;
	}


	compono.ui = compono.Class({})
	
	compono.ui.widget = compono.ui.Class({
		name:"Widget",
		constructor:function(a){
			console.log("Widget.constructor",a)
		},
		trace:function(a){
			console.log("Widget.trace",a)
			return this;
		}
	});

	compono.ui.gadget = compono.ui.Class({
		name:"Gadget",
		constructor:function(a){
			console.log("Gadget.constructor",this.core)
		},
		alert:function(a){
			console.log("Gadget.trace",a)
			return this;
		}
	})

	console.log(widget, new widget("1"))
	console.log(gadget, new gadget("A"))

	
	</script>
</head>
<body>
</body>
</html>